package com.duobaoyu.dby.supply.db.entity.order;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.duobaoyu.dby.common.mybatis.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 补单信息表
 * @Author yangyong
 * @Date 2023/10/17
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ApiModel(value = "补单信息表")
@EqualsAndHashCode(callSuper = true)
@TableName(value = "sc_order_repair")
public class OrderRepair extends BaseEntity{
	private static final long serialVersionUID = -4744019587165944696L;
	/**
	 * 主键ID
	 */
	@ApiModelProperty(value = "主键ID")
	@TableId(type = IdType.ASSIGN_ID)
	private Long id;

	/**
	 * 供应链订单号
	 */
	@ApiModelProperty(value = "供应链订单号")
	private String orderSn;

	/**
	 * 供应链交易单号
	 */
	@ApiModelProperty(value = "供应链交易单号")
	private String supplyTradeSn;

	/**
	 * 业务订单交易号
	 */
	@ApiModelProperty(value = "业务订单交易号")
	private String bizTradeSn;

	/**
	 * 渠道编码
	 */
	@ApiModelProperty(value = "渠道编码")
	private String channelCode;

	/**
	 * 渠道订单金额
	 */
	@ApiModelProperty(value = "渠道订单金额")
	private BigDecimal channelOrderAmount;

	/**
	 * 补单状态：1-待补单 2-补单中 3-补单失败 4-已补单 5-已关闭
	 */
	@ApiModelProperty(value = "补单状态：1-待补单 2-补单中 3-补单失败 4-已补单 5-已关闭")
	private Integer repairStatus;

	/**
	 * 商户ID
	 */
	@ApiModelProperty(value = "商户ID")
	private String mchId;

	/**
	 * 失败类型
	 */
	@ApiModelProperty(value = "失败类型")
	private Integer exceptionType;

	/**
	 * 失败详情
	 */
	@ApiModelProperty(value = "失败详情")
	private String failDesc;

	/**
	 * 展示来源渠道
	 */
	@ApiModelProperty(value = "展示来源渠道")
	private String showServerName;

	/**
	 * 补单次数
	 */
	@ApiModelProperty(value = "补单次数")
	private Integer repairTimes;

	/**
	 * 最后一次补单时间
	 */
	@ApiModelProperty(value = "最后一次补单时间")
	private LocalDateTime lastRepairTime;

	/**
	 * 版本号-用作乐观锁
	 */
	@ApiModelProperty(value = "版本号-用作乐观锁")
	private Integer version;

	/**
	 * 是否删除 0-否 1-是
	 */
	@ApiModelProperty(value = "是否删除 0-否 1-是")
	private Integer delFlag;
}
